#ifndef USERPROG_PROCESS_H
#define USERPROG_PROCESS_H

#include "threads/thread.h"
#include "threads/synch.h"
#include <list.h>

/* Child process status. */
struct child_status {
    tid_t tid;                  /* Child process thread ID. */
    int exit_status;            /* Exit status of the child. */
    bool exited;                /* Has the child exited? */
    struct semaphore sema;      /* Semaphore for parent-child synchronization. */
    struct list_elem elem;      /* List element for parent's children list. */
};

tid_t process_execute(const char *cmd_line);
int process_wait(tid_t);
void process_exit(void);
void process_activate(void);

#endif /* userprog/process.h */
